3.94 \(\int \frac{\cos (a+b \sqrt{c+d x})}{x^2} \, dx\)

Optimal. Leaf size=184 \[ \frac{b d \sin \left (a-b \sqrt{c}\right ) \text{CosIntegral}\left (b \left (\sqrt{c+d x}+\sqrt{c}\right )\right )}{2 \sqrt{c}}-\frac{b d \sin \left (a+b \sqrt{c}\right ) \text{CosIntegral}\left (b \sqrt{c}-b \sqrt{c+d x}\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a-b \sqrt{c}\right ) \text{Si}\left (b \left (\sqrt{c}+\sqrt{c+d x}\right )\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a+b \sqrt{c}\right ) \text{Si}\left (b \sqrt{c}-b \sqrt{c+d x}\right )}{2 \sqrt{c}}-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x} \]

[Out]

-(Cos[a + b*Sqrt[c + d*x]]/x) + (b*d*CosIntegral[b*(Sqrt[c] + Sqrt[c + d*x])]*Sin[a - b*Sqrt[c]])/(2*Sqrt[c])
- (b*d*CosIntegral[b*Sqrt[c] - b*Sqrt[c + d*x]]*Sin[a + b*Sqrt[c]])/(2*Sqrt[c]) + (b*d*Cos[a - b*Sqrt[c]]*SinI
ntegral[b*(Sqrt[c] + Sqrt[c + d*x])])/(2*Sqrt[c]) + (b*d*Cos[a + b*Sqrt[c]]*SinIntegral[b*Sqrt[c] - b*Sqrt[c +
 d*x]])/(2*Sqrt[c])

________________________________________________________________________________________

Rubi [A]  time = 0.349114, antiderivative size = 184, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3432, 3342, 3333, 3303, 3299, 3302} \[ \frac{b d \sin \left (a-b \sqrt{c}\right ) \text{CosIntegral}\left (b \left (\sqrt{c+d x}+\sqrt{c}\right )\right )}{2 \sqrt{c}}-\frac{b d \sin \left (a+b \sqrt{c}\right ) \text{CosIntegral}\left (b \sqrt{c}-b \sqrt{c+d x}\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a-b \sqrt{c}\right ) \text{Si}\left (b \left (\sqrt{c}+\sqrt{c+d x}\right )\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a+b \sqrt{c}\right ) \text{Si}\left (b \sqrt{c}-b \sqrt{c+d x}\right )}{2 \sqrt{c}}-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*Sqrt[c + d*x]]/x^2,x]

[Out]

-(Cos[a + b*Sqrt[c + d*x]]/x) + (b*d*CosIntegral[b*(Sqrt[c] + Sqrt[c + d*x])]*Sin[a - b*Sqrt[c]])/(2*Sqrt[c])
- (b*d*CosIntegral[b*Sqrt[c] - b*Sqrt[c + d*x]]*Sin[a + b*Sqrt[c]])/(2*Sqrt[c]) + (b*d*Cos[a - b*Sqrt[c]]*SinI
ntegral[b*(Sqrt[c] + Sqrt[c + d*x])])/(2*Sqrt[c]) + (b*d*Cos[a + b*Sqrt[c]]*SinIntegral[b*Sqrt[c] - b*Sqrt[c +
 d*x]])/(2*Sqrt[c])

Rule 3432

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_.) + (h_.)*(x_))^(m_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - (e*h)/f + (h*x^(1/n))/f)^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rule 3342

Int[Cos[(c_.) + (d_.)*(x_)]*((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(e^m*(a + b*x^
n)^(p + 1)*Cos[c + d*x])/(b*n*(p + 1)), x] + Dist[(d*e^m)/(b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*Sin[c + d*x],
 x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, -1] && EqQ[m, n - 1] && (IntegerQ[n] || GtQ[e, 0])

Rule 3333

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (a +
 b*x^n)^p, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IGtQ[n, 0] && (EqQ[n, 2] || EqQ[p, -1])

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\cos \left (a+b \sqrt{c+d x}\right )}{x^2} \, dx &=\frac{2 \operatorname{Subst}\left (\int \frac{x \cos (a+b x)}{\left (-\frac{c}{d}+\frac{x^2}{d}\right )^2} \, dx,x,\sqrt{c+d x}\right )}{d}\\ &=-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x}-b \operatorname{Subst}\left (\int \frac{\sin (a+b x)}{-\frac{c}{d}+\frac{x^2}{d}} \, dx,x,\sqrt{c+d x}\right )\\ &=-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x}-b \operatorname{Subst}\left (\int \left (-\frac{d \sin (a+b x)}{2 \sqrt{c} \left (\sqrt{c}-x\right )}-\frac{d \sin (a+b x)}{2 \sqrt{c} \left (\sqrt{c}+x\right )}\right ) \, dx,x,\sqrt{c+d x}\right )\\ &=-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x}+\frac{(b d) \operatorname{Subst}\left (\int \frac{\sin (a+b x)}{\sqrt{c}-x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}+\frac{(b d) \operatorname{Subst}\left (\int \frac{\sin (a+b x)}{\sqrt{c}+x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}\\ &=-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x}+\frac{\left (b d \cos \left (a-b \sqrt{c}\right )\right ) \operatorname{Subst}\left (\int \frac{\sin \left (b \sqrt{c}+b x\right )}{\sqrt{c}+x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}-\frac{\left (b d \cos \left (a+b \sqrt{c}\right )\right ) \operatorname{Subst}\left (\int \frac{\sin \left (b \sqrt{c}-b x\right )}{\sqrt{c}-x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}+\frac{\left (b d \sin \left (a-b \sqrt{c}\right )\right ) \operatorname{Subst}\left (\int \frac{\cos \left (b \sqrt{c}+b x\right )}{\sqrt{c}+x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}+\frac{\left (b d \sin \left (a+b \sqrt{c}\right )\right ) \operatorname{Subst}\left (\int \frac{\cos \left (b \sqrt{c}-b x\right )}{\sqrt{c}-x} \, dx,x,\sqrt{c+d x}\right )}{2 \sqrt{c}}\\ &=-\frac{\cos \left (a+b \sqrt{c+d x}\right )}{x}+\frac{b d \text{Ci}\left (b \left (\sqrt{c}+\sqrt{c+d x}\right )\right ) \sin \left (a-b \sqrt{c}\right )}{2 \sqrt{c}}-\frac{b d \text{Ci}\left (b \sqrt{c}-b \sqrt{c+d x}\right ) \sin \left (a+b \sqrt{c}\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a-b \sqrt{c}\right ) \text{Si}\left (b \left (\sqrt{c}+\sqrt{c+d x}\right )\right )}{2 \sqrt{c}}+\frac{b d \cos \left (a+b \sqrt{c}\right ) \text{Si}\left (b \sqrt{c}-b \sqrt{c+d x}\right )}{2 \sqrt{c}}\\ \end{align*}

Mathematica [C]  time = 1.22471, size = 240, normalized size = 1.3 \[ \frac{i \left (e^{-i a} \left (-b d x e^{-i b \sqrt{c}} \text{Ei}\left (-i b \left (\sqrt{c+d x}-\sqrt{c}\right )\right )+b d x e^{i b \sqrt{c}} \text{Ei}\left (-i b \left (\sqrt{c}+\sqrt{c+d x}\right )\right )+2 i \sqrt{c} e^{-i b \sqrt{c+d x}}\right )+e^{i \left (a-b \sqrt{c}\right )} \left (b d x e^{2 i b \sqrt{c}} \text{Ei}\left (i b \left (\sqrt{c+d x}-\sqrt{c}\right )\right )-b d x \text{Ei}\left (i b \left (\sqrt{c}+\sqrt{c+d x}\right )\right )+2 i \sqrt{c} e^{i b \left (\sqrt{c+d x}+\sqrt{c}\right )}\right )\right )}{4 \sqrt{c} x} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*Sqrt[c + d*x]]/x^2,x]

[Out]

((I/4)*((((2*I)*Sqrt[c])/E^(I*b*Sqrt[c + d*x]) - (b*d*x*ExpIntegralEi[(-I)*b*(-Sqrt[c] + Sqrt[c + d*x])])/E^(I
*b*Sqrt[c]) + b*d*E^(I*b*Sqrt[c])*x*ExpIntegralEi[(-I)*b*(Sqrt[c] + Sqrt[c + d*x])])/E^(I*a) + E^(I*(a - b*Sqr
t[c]))*((2*I)*Sqrt[c]*E^(I*b*(Sqrt[c] + Sqrt[c + d*x])) + b*d*E^((2*I)*b*Sqrt[c])*x*ExpIntegralEi[I*b*(-Sqrt[c
] + Sqrt[c + d*x])] - b*d*x*ExpIntegralEi[I*b*(Sqrt[c] + Sqrt[c + d*x])])))/(Sqrt[c]*x)

________________________________________________________________________________________

Maple [B]  time = 0.181, size = 714, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*(d*x+c)^(1/2))/x^2,x)

[Out]

2*d/b^2*(cos(a+b*(d*x+c)^(1/2))*(-1/2*a*b^2/c*(a+b*(d*x+c)^(1/2))+1/2*b^2*(-b^2*c+a^2)/c)/(-b^2*c+(a+b*(d*x+c)
^(1/2))^2-2*(a+b*(d*x+c)^(1/2))*a+a^2)-1/4*a*b/c^(3/2)*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*(d
*x+c)^(1/2)-b*c^(1/2))*cos(a+b*c^(1/2)))+1/4*a*b/c^(3/2)*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b
*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2)))-1/4*b*(b^2*c+(a+b*c^(1/2))*a-a^2)/c^(3/2)*(-Si(b*c^(1/2)-b*(d*x+c)
^(1/2))*cos(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*sin(a+b*c^(1/2)))+1/4*b*(b^2*c+(a-b*c^(1/2))*a-a^2)/c^(
3/2)*(Si(b*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2)))-a*b^4*(co
s(a+b*(d*x+c)^(1/2))*(-1/2/b^2/c*(a+b*(d*x+c)^(1/2))+1/2*a/b^2/c)/(-b^2*c+(a+b*(d*x+c)^(1/2))^2-2*(a+b*(d*x+c)
^(1/2))*a+a^2)-1/4/b^3/c^(3/2)*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*c
os(a+b*c^(1/2)))+1/4/b^3/c^(3/2)*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2)
)*cos(a-b*c^(1/2)))-1/4/b^2/c*(-Si(b*c^(1/2)-b*(d*x+c)^(1/2))*cos(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*s
in(a+b*c^(1/2)))-1/4/b^2/c*(Si(b*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a
-b*c^(1/2)))))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (\sqrt{d x + c} b + a\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="maxima")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x^2, x)

________________________________________________________________________________________

Fricas [C]  time = 1.82255, size = 489, normalized size = 2.66 \begin{align*} \frac{\sqrt{-b^{2} c} d x{\rm Ei}\left (i \, \sqrt{d x + c} b - \sqrt{-b^{2} c}\right ) e^{\left (i \, a + \sqrt{-b^{2} c}\right )} - \sqrt{-b^{2} c} d x{\rm Ei}\left (i \, \sqrt{d x + c} b + \sqrt{-b^{2} c}\right ) e^{\left (i \, a - \sqrt{-b^{2} c}\right )} + \sqrt{-b^{2} c} d x{\rm Ei}\left (-i \, \sqrt{d x + c} b - \sqrt{-b^{2} c}\right ) e^{\left (-i \, a + \sqrt{-b^{2} c}\right )} - \sqrt{-b^{2} c} d x{\rm Ei}\left (-i \, \sqrt{d x + c} b + \sqrt{-b^{2} c}\right ) e^{\left (-i \, a - \sqrt{-b^{2} c}\right )} - 4 \, c \cos \left (\sqrt{d x + c} b + a\right )}{4 \, c x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="fricas")

[Out]

1/4*(sqrt(-b^2*c)*d*x*Ei(I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^(I*a + sqrt(-b^2*c)) - sqrt(-b^2*c)*d*x*Ei(I*sqrt
(d*x + c)*b + sqrt(-b^2*c))*e^(I*a - sqrt(-b^2*c)) + sqrt(-b^2*c)*d*x*Ei(-I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^
(-I*a + sqrt(-b^2*c)) - sqrt(-b^2*c)*d*x*Ei(-I*sqrt(d*x + c)*b + sqrt(-b^2*c))*e^(-I*a - sqrt(-b^2*c)) - 4*c*c
os(sqrt(d*x + c)*b + a))/(c*x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos{\left (a + b \sqrt{c + d x} \right )}}{x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)**(1/2))/x**2,x)

[Out]

Integral(cos(a + b*sqrt(c + d*x))/x**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (\sqrt{d x + c} b + a\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="giac")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x^2, x)